#pragma once

#include <string>

#include <SDL.h>
#include <SDL_rotozoom.h>
#include <SDL_image.h>

#include "Global.h"

using namespace std;

class Affichage
{
	public:
		Affichage();

		bool initSurfacePrincipale();
		void initSurfaceTravail();

		SDL_Surface* loadImage( string filename );
		SDL_Surface* loadImage( string filename, Uint8 cKeyR, Uint8 cKeyG, Uint8 cKeyB );

		void applySurface( int x, int y, SDL_Surface* source, SDL_Rect* clip );
		void drawPixel( int x, int y, Uint8 R, Uint8 G, Uint8 B );

		void afficherSurfacePrincipale();
		void introduireDelai( Uint32 msec );

		void toggleFullScreen();

		~Affichage();

	private:
		SDL_Surface *surfacePrincipale;
		SDL_Surface *surfaceTravail;
		SDL_Surface *surfaceZoom2x;

		SDL_Rect src;
		SDL_Rect dst;

		int fullScreen;
};
